package org.whh.auth.mapper;

import org.apache.ibatis.annotations.Param;
import org.whh.auth.domain.Role;
import org.whh.base.mapper.BaseMapper;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {

    void deleteRolePermissionByRoleId(Integer roleId);

    void saveRolePermission(@Param("roleId") Integer roleId, @Param("permissionSns") String[] permissionSns);

    List<String> getSnByRowId(Long roleId);

    void deleteRoleMenuByRoleId(Integer roleId);

    void saveRoleMenu(@Param("roleId") Integer roleId, @Param("menuIds") Long[] menuIds);

    List<Long> getMenuIdByRowId(Long roleId);

    List<Long> getAllRoleId();

    List<Role> getRoles();
}
